package service

import (
	"goconfcenter/dao/mysql"
	"goconfcenter/models"
)

type ResourceService struct {
}

func ResourceServiceInstance() *ResourceService {
	return &ResourceService{}
}

func (c *ResourceService) GetList() []*models.ResourcePoJo {
	return mysql.ResourceDaoInstance().GetList()
}
func (c *ResourceService) Update(resource *models.Resource) bool {
	return mysql.ResourceDaoInstance().Update(resource)
}
func (c *ResourceService) Insert(resource *models.Resource) bool {
	return mysql.ResourceDaoInstance().Insert(resource)
}
func (c *ResourceService) BathDelete(ids *[]int64) bool {
	return mysql.ResourceDaoInstance().BathDelete(ids)
}
func (c *ResourceService) Get(resourceId int64) *models.Resource {
	return mysql.ResourceDaoInstance().Get(resourceId)
}
